#include "Spl_list.h" 

Elenemt_data Stu_data[50] = 
{
 { .name = "刘备" , .sex = "男" , .sco = 60 , .age = 18 , .id = 1  },
 { .name = "关羽" , .sex = "男" , .sco = 60 , .age = 18 , .id = 2  },
 { .name = "张飞" , .sex = "男" , .sco = 60 , .age = 18 , .id = 3  },
 { .name = "诸葛" , .sex = "男" , .sco = 60 , .age = 18 , .id = 4  },
 { .name = "赵云" , .sex = "男" , .sco = 60 , .age = 18 , .id = 5  },
 { .name = "马超" , .sex = "男" , .sco = 60 , .age = 18 , .id = 6  },
 { .name = "祝融" , .sex = "女" , .sco = 60 , .age = 18 , .id = 7  },
 { .name = "小乔" , .sex = "女" , .sco = 60 , .age = 18 , .id = 8  },
 { .name = "大乔" , .sex = "女" , .sco = 60 , .age = 18 , .id = 9  },
 { .name = "貂蝉" , .sex = "女" , .sco = 60 , .age = 18 , .id = 10  }
};
void test ()
{   
    Link_list *L = init_link_list();
    printf("\n==============插入==============\n");
    insert_node_end(L, Stu_data[0]);
    insert_node_end(L, Stu_data[1]);
    insert_node_end(L, Stu_data[2]);
    insert_node_end(L, Stu_data[3]);
    print_link_list(L);
    printf("\n");
    insert_node_begin(L,Stu_data[9]);
    print_link_list(L);
    printf("\n");
    insert_node(L, Stu_data[8], 3);
    print_link_list(L);
    printf("\n==============删除==============\n");
    delete_node_end(L);
    print_link_list(L);
    printf("\n");
    delete_node_begin(&L);
    print_link_list(L);
    printf("\n");
    delete_node(L, 3);
    print_link_list(L);
    printf("\n");
}

int main(int argc, char *argv[]) 
{
    test();
    return 0;
}